package main

import (
	"fmt"
	"strings"
)

func main()  {
	f := makeSuffix(".jpg")
	fmt.Println(f("zp.zip"))
}

func makeSuffix(suffix string)  func (string) string {
	return func(file string) string {
		if strings.HasSuffix(file, suffix) {
			return file
		} else {
			return file + suffix
		}
	}
	
}